package com.ajhlp.spring_modules.db.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.ajhlp.spring_modules.db.dao.IUserDao;
import com.ajhlp.spring_modules.db.model.User;

public class UserServiceImpl implements IUserService {
	
	@Resource
	private IUserDao userDao;
	

	public IUserDao getUserDao() {
		return userDao;
	}

	public void setUserDao(IUserDao userDao) {
		this.userDao = userDao;
	}

	public int countAll() {
		// TODO Auto-generated method stub
		return userDao.countAll();
	}

	public User findById(int id) {
		// TODO Auto-generated method stub
		return userDao.findById(id);
	}

	public void addUser(User user) {
		// TODO Auto-generated method stub
		userDao.addUser(user);
	}

}
